package produce;

public class Repository <T>{

	private int size; 
	private T[] arr;
	private int index;
	public Repository(int size) {
	this.size =size;
	arr=(T[]) new Object[size];

	}
public void save(T o){
	while(index==size){
		try{this.wait();
	}catch (InterruptedException e){
		e.printStackTrace();
	}}this.notify();
	arr[index]=o;
	index++;
	
}public synchronized T take(){
	while(index==0){
try
}
}
